#include<stdio.h>
double f(double x,double y)
{ if(x>=y)
        return (x+y)/2.0;
    else
        return f(f(x+2,y-1),f(x+1,y-2));
}
void main()
{
    printf("%.1f",f(5.0, 7.0));
}